#!/usr/bin/env python


from google.appengine.ext import webapp
import wsgiref.handlers
from google.appengine.ext.webapp.util import run_wsgi_app

from handlers.help import atoz, atozadmin

ROUTES = [
          ('/404.html', atoz.NotFoundHandler),
          ('/403', atoz.NotAuthorizedHandler),
          ('/search', atoz.SearchHandler),
          ('/tag/(.*)', atoz.TagHandler),
          ('/contact', atoz.ContactHandler),
          ('/admin/', atozadmin.AdminHandler),
          ('/', atoz.RootHandler),
          ('/topic.*', atoz.TopicHandler),
          ('/question.*', atoz.QuestionHandler),
          ('/static/(.*)/(.*)', atoz.StaticHandler),
          ('/img.*', atoz.ImageHandler)
          ]

def main():
    application = webapp.WSGIApplication(ROUTES, debug=True)
    run_wsgi_app(application)

if __name__ == '__main__':
    main()
